package com.steak.system.common.config;

import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.stereotype.Component;
import javax.jms.Topic;

@Component
@EnableJms
public class ActiveMQConfig {
    @Value("${MyTopic}")
    private String topic; //注册队列
    @Value("${MyTopic2}")
    private String topic2; //是否通过队列
    @Value("${MyTopic3}")
    private String topic3; //是否通过面试队列

    @Bean
    public Topic topic(){
        return new ActiveMQTopic(topic);
    }

    @Bean
    public Topic topic2(){
        return new ActiveMQTopic(topic2);
    }

    @Bean
    public Topic topic3(){
        return new ActiveMQTopic(topic3);
    }
}
